@if(count($list['data'])<=4)
<li>
@if($list['data'])
    @foreach($list['data'] as $k=>$v)
            <div class="tabBox">
                <div class="Box" new-id="{{$v['id']}}">
                    <div class="img" style="background: url('{{asset('storage/'.$v['thumb'])}}') no-repeat center;background-size:cover "></div>
                    <p>{{$v['post_title']}}</p>
                    <div class="time">
                        {{date_format(new DateTime($v['updated_at']),'m/d H:i')}}
                    </div>
                </div>
                <div class="popBox" newBox="{{$v['id']}}">
                    <div class="main">
                        <!--内容区域-->
                        <div class="txtBox">
                            <div class="p20">
                                <p class="txtTitle">{{$v['post_title']}}</p>
                                <p class="txtTime">
                                    {{date_format(new DateTime($v['updated_at']),'m/d H:i')}}
                                </p>
                                <div class="cont">
                                    {!! $v['content'] !!}
                                </div>
                            </div>
                        </div>
                        <!--关闭-->
                        <div class="close">
                            <img src="/coopen/images/close.png" />
                        </div>
                        <!--切换按钮-->
                        <div class="switch">
                            @if(!$loop->first)
                                <a href="javascript:void(0)" class="left checkNew" new-id="{{$list['data'][$k-1]['id']}}"><img src="/coopen/images/left.png" /></a>
                            @endif
                            @if(!$loop->last)
                                <a href="javascript:void(0)" class="right checkNew" new-id="{{$list['data'][$k+1]['id']}}"><img src="/coopen/images/right.png" /></a>
                            @endif
                        </div>
                    </div>

                </div>
            </div>


        @endforeach
@endif
</li>
@else
    @php
        $i = 1;
    @endphp
        @if($list['data'])
            @foreach($list['data'] as $k=>$v)
                @if($i==1)
                <li>
                @endif
                @php
                    $i++;
                @endphp
                <div class="tabBox">
                    <div class="Box" new-id="{{$v['id']}}">
                        <div class="img" style="background: url('{{asset('storage/'.$v['thumb'])}}') no-repeat center;background-size:cover "></div>
                        <p>{{$v['post_title']}}</p>
                        <div class="time">
                            {{date_format(new DateTime($v['updated_at']),'m/d H:i')}}
                        </div>
                    </div>
                    <div class="popBox" newBox="{{$v['id']}}">
                        <div class="main">
                            <!--内容区域-->
                            <div class="txtBox">
                                <div class="p20">
                                    <p class="txtTitle">{{$v['post_title']}}</p>
                                    <p class="txtTime">
                                        {{date_format(new DateTime($v['updated_at']),'m/d H:i')}}
                                    </p>
                                    <div class="cont">
                                        {!! $v['content'] !!}
                                    </div>
                                </div>
                            </div>
                            <!--关闭-->
                            <div class="close">
                                <img src="/coopen/images/close.png" />
                            </div>
                            <!--切换按钮-->
                            <div class="switch">
                                @if(!$loop->first)
                                    <a href="javascript:void(0)" class="left checkNew" new-id="{{$list['data'][$k-1]['id']}}"><img src="/coopen/images/left.png" /></a>
                                @endif
                                @if(!$loop->last)
                                    <a href="javascript:void(0)" class="right checkNew" new-id="{{$list['data'][$k+1]['id']}}"><img src="/coopen/images/right.png" /></a>
                                @endif
                            </div>
                        </div>

                    </div>

                </div>

                @if($i==5)
                    @php
                    $i = 1;
                    @endphp
                </li>
                @endif
            @endforeach
        @endif
@endif
